package com.mineapp.test

import android.os.Bundle
import android.view.View
import android.widget.Button
import com.mineapp.base.BaseActivity
import com.mineapp.R

/**
 * Created by mac on 2017/8/1.
 */
class TestActivity : BaseActivity(), View.OnClickListener{
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_test)
        val btnAddFrag1 = findViewById(R.id.btn_add_frg) as Button
        btnAddFrag1.setOnClickListener(this)
    }

    override fun onClick(v: View) {
        val id = v.id
        when (id) {
            R.id.btn_add_frg -> {
                push(TestFragment::class.java, null)
            }
        }

    }

    override fun onBackPressed() {
        pop()
    }
}